package com.example.qxfw.cshx.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qxfw.common.entity.zy.CshxZsyb;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.sql.Timestamp;
import java.util.List;

@Mapper
@DS("service")
public interface CshxZsybMapper extends BaseMapper<CshxZsyb> {


    String selectForecastDate();


    List<String> selectStationName(@Param("dxMin") String dxMin, @Param("dxMax") String dxMax, @Param("dyMin") String dyMin, @Param("dyMax") String dyMax, @Param("forcastdate") String forcastdate);


    List<CshxZsyb> selectList1(@Param("forecastDate") String forecastDate, @Param("stationIds") String stationIds);

        List<CshxZsyb> queryByForecastDate(Timestamp forecastDate);

    /**
     * 根据预报日期查询火险数据（带排序）
     * @param timestamp 预报日期
     * @return 火险数据列表
     */
    @Select("SELECT * FROM cshx_zsyb WHERE forcastdate = #{date} ORDER BY fireindex ASC")
    List<CshxZsyb> getList(Timestamp timestamp);
}
